file(GLOB HEADERS include/*.h)

add_executable(unit_tests
	${HEADERS}
  unit_tests.cpp ipkcontainer_test.cpp sz4_block_unit_test.cpp
  parhublistener_test.cpp conversion_test.cpp szb_param_monitor_unit_test.cpp
  sz4_file_search.cpp sz4_buffer_unit_test.cpp sz4_factory_test.cpp
	sz4_base_test.cpp sz4_definable_param_cache.cpp test_observer.cpp
	base_param_converter_unit_test.cpp sz4_lua_param_optimized.cpp
  sz4_lua_param.cpp sz4_combined_param.cpp sz4_definable_param.cpp
  sz4_wsum.cpp sz4_live_cache.cpp sz4_decode_test.cpp
  filelogger_test.cpp loghandler_test.cpp zmq_handler_test.cpp
  cmdlineparser_test.cpp argsmgr_test.cpp
)

target_include_directories(unit_tests
	PRIVATE
    $<INSTALL_INTERFACE:include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
		${CMAKE_SOURCE_DIR}/iks/server/include
)

target_link_libraries(unit_tests
	PRIVATE
		Szarp2
		${CPPUNIT_LIBRARIES}
    iks-server-data
    iks-server-utils
		wxcommon
)

add_executable(sz4_extr_simple
  sz4_extr_simple.cpp
)

target_link_libraries(sz4_extr_simple
	PRIVATE
		Szarp2
)

add_test(NAME unit_tests.test COMMAND unit_tests)

add_subdirectory(libSzarp)
